import {createRouter, createWebHashHistory} from 'vue-router';
import Remote from '../views/remote';
import Device from '../views/device';
import Meeting from '../views/meeting';
import Login from '../views/login';
import Register from '../views/register';
import Lock from '../views/lock';
import Layout from '../layout';

const routes = [
  {
    path: '/',
    component: Layout,
    redirect: '/remote',
    name: 'main',
    children: [
      {
        path: '/remote',
        name: 'Remote',
        component: Remote
      },
      {
        path: '/device',
        name: 'Device',
        component: Device
      },
      {
        path: '/meeting',
        name: 'Meeting',
        component: Meeting
      },
      {
        path: '/login',
        name: 'Login',
        component: Login
      },
      {
        path: '/register',
        name: 'Register',
        component: Register
      },
      {
        path: '/lock',
        name: 'Lock',
        component: Lock
      }
    ]
  }
];

const router = createRouter({
  history: createWebHashHistory(),
  routes
});

export default router;
